import Vue from 'vue'
import Router from 'vue-router'

// vue 基础信息的学习
import basicRouter from "./basicRouter.js"
import componentRouter from "./componentRouter.js"
import extendPrototypeRouter from "./extendPrototypeRouter.js"
import iviewExtenddRouter from "./iviewExtenddRouter.js"

import loggerVueIndex from "../page/basic/vueLog/loggerVueIndex.vue"
import loggerVue from "../page/basic/vueLog/loggerVue.vue"

Vue.use(Router)

export default new Router({
    linkActiveClass: 'open active',
    scrollBehavior: () => ({y: 0}),
    routes: [
        {
          path: '/',
          redirect: '/basic',
          hidden: true
        },
        // demo 的路由
        basicRouter,
        // 使用组件的路由
        componentRouter,
        // 扩展内置对象
        extendPrototypeRouter,
        // iview内置对象扩展
        iviewExtenddRouter,
        {
            name:"demo-basic-vueLog-loggerVueIndex",// 工程名-路径-文件名
            path: '/loggerVueIndex',// 组件名称
            title: 'vue日志规范',
            component: loggerVueIndex, // 引入的组件名
            redirect: '/loggerVueIndex/loggerVue',
            children: [
                {
                    name:"demo-basic-vueLog-loggerVue",// 工程名-路径-文件名
                    path: '/loggerVue',// 组件名称
                    title: 'vue日志规范',
                    component: loggerVue, // 引入的组件名
                },
            ]
        },

    ]
})
